<extend name="CommonAdmin:base" />

<block name="script">
<script>
$(function() {
   $("#list").tablesorter({ theme : 'blue' });
   $("button.update").button({
       icons: {
         primary: "ui-icon-pencil"
       },
       text: false
   });
   $("button.delete").button({
       icons: {
         primary: "ui-icon-trash"
       },
       text: false
   });
   $("button.create").button({
       icons: {
         primary: "ui-icon-document"
       }
   });
});
function update(id) {
    var url = "__URL__/update/id/" + id;
    window.location = url;
}
function del(id) {
    var url = "__URL__/delete/id/" + id;
    window.location = url;
}
function create() {
    var url = "__URL__/create";
    window.location = url;
}
</script>
</block>

<block name="main-in">
<div class="toolbar ui-widget-header ui-corner-all">
<button class="create" onclick="create()">新建</button>
</div>

<div style="width: 100%">
<table id="list" class="tablesorter" border="0" cellpadding="0" cellspacing="1">
    <thead>
        <tr>
            <th nowrap>公司名称</th>
            <th nowrap>折扣</th>
            <th nowrap>支付费用</th>
            <th nowrap>发票金额</th>
            <th nowrap>支付明细</th>
            <th nowrap>桌号</th>
            <th nowrap>发票描述</th>
            <th nowrap>是否显示</th>
            <th nowrap>支付方式</th>
            <th nowrap>支付时间</th>
            <th nowrap>应付账单</th>
            <th nowrap>营业员</th>
            <th nowrap>收银员</th>
            <th nowrap>操作</th>
        </tr>
    </thead>
    <tbody></tbody>
    <volist name="list" id="vo">
    <tr>
        <td>{$vo.companyname}</td>
        <td>{$vo.pay_discount}</td>
        <td>{$vo.pay_fee}</td>
        <td>{$vo.pay_bill}</td>
        <td>{$vo.pay_desc}</td>
        <td>{$vo.table_num}</td>
        <td>{$vo.bill_text}</td>
        <td>{$vo.enabled}</td>
        <td>{$vo.pay_type}</td>
        <td>{$vo.pay_time}</td>
        <td>{$vo.pay_may}</td>
        <td>{$vo.cname}</td>
        <td>{$vo.acccname}</td>
        <td>
        <button class="update" onclick="update('{$vo.id}')">查看/修改</button>
        <button class="delete" onclick="del('{$vo.id}')">删除</button>
        </td>
    </tr>
    </volist>
</table>
</div>
</block>